/*
 * © Copyright 2011 Romain Marteau, Matthieu Totet
 * 
 *    This file is part of VineaToum.
 *
 *    VineaToum is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    VineaToum is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with VineaToum.  If not, see <http://www.gnu.org/licenses/>.
 *    
 */

package org.vineatoum.business.state;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Vector;

import org.vineatoum.business.state.abstraction.VinAbstract;
import org.vineatoum.view.utils.jtablecustom.TableListener;

public class Benne extends VinAbstract {
	public static List<Benne> bennes = new ArrayList<Benne>();
	
	private long id;
	private String name;
	private Date date;
	//private float quantity;
	private float density;
	private float acidity;
	private List<Recolte> recoltes;
	
	public Benne() {
		recoltes = new ArrayList<Recolte>();
		bennes.add(this);
		// TODO Auto-generated constructor stub
	}


	public void addRecolte(Recolte recolte) {
		recoltes.add(recolte);
		origines.add(recolte);
	}
	
	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}


	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}


	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}


	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}


	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}




	/**
	 * @return the density
	 */
	public float getDensity() {
		return density;
	}


	/**
	 * @param density the density to set
	 */
	public void setDensity(float density) {
		this.density = density;
	}


	/**
	 * @return the acidity
	 */
	public float getAcidity() {
		return acidity;
	}


	/**
	 * @param acidity the acidity to set
	 */
	public void setAcidity(float acidity) {
		this.acidity = acidity;
	}


	@Override
	public TableListener getNewInstance() {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public Vector<String> getVectorColumns() {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public Vector<Object> getVectorData() {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public void updateField(String field, Object value) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String toString() {
		String out = "----- Benne " + name + " formée de " + origines.size() + " origines.\n";
		return out;
	}
}
